<?
require_once('./lib/authentication.lib.php');

$query = "SELECT * FROM Championship ORDER BY name, begin;";
$result_champ = mysql_query($query);

$num_champ = mysql_numrows($result_champ);
if ($num_champ == 0)
{
	die("No chamiponships found");
}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD><TITLE>Golaberto</TITLE></HEAD>
<BODY>

<?

$i = 0;
while ($i < $num_champ)
{
	$id_champ = mysql_result($result_champ, $i, "id");
	$name_champ = mysql_result($result_champ, $i, "name");
	$begin = mysql_result($result_champ, $i, "begin");
	$end = mysql_result($result_champ, $i, "end");

	$begin = substr($begin, 0, 4);
	$end = substr($end, 0, 4);

	echo "<H3><A HREF='table.php?id=$id_champ'>$name_champ $begin" . (($begin !== $end) ? "/$end" : "") . "</A></H3>\n";

	$i++;
}

?>

<BR>
<center><small>Contact: golaberto@gmail.com</small></center>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-166590-2";
urchinTracker();
</script>
</BODY>
</HTML>
